# clear()删除全部字典对象
x = dict(name='Jhon', age=25)
x.clear()
print(x)
# 复制字典对象
x = {'name': 'John', 'age': 25}
y = x  # 直接赋值时，x和y引用同一个字典
print(y)
y['name'] = 'Curry'  # 通过y修改字典
print(x, y)
print(x is y)
y = x.copy()  # y引用复制的字典
y['name'] = 'Python'  # 此时不影响x的引用
print(x, y)
print(y is x)  # 判断是否引用相同对象